public class Test03 {

    public static String addBinary(String a, String b) {

        String s1 = a.length()>b.length()?a:b;
        String s2 = s1.equals(a)?b:a;
        StringBuilder s3 = new StringBuilder();
        StringBuilder lStr = new StringBuilder(s1);
        StringBuilder sStr = new StringBuilder(s2);
        lStr = lStr.reverse();
        sStr = sStr.reverse();
        int t = 0;
        int i = 0;
        for( i =0;i<sStr.length();i++) {
            int x = (lStr.charAt(i)+sStr.charAt(i)+t)%2;
            s3.append(x);
            t = (lStr.charAt(i)+sStr.charAt(i)+t)/2;
        }
        if(i<lStr.length()){
            for(int j =i;j<lStr.length();j++){
                int x= (lStr.charAt(j)+t)%2;
                s3.append(x);
                t = (lStr.charAt(j)+t)/2;
            }

        }
        if(t>=1){
            s3.append(1);
        }
        return String.valueOf(s3);
    }

    public static void main(String[] args) {
        String s3 = addBinary("0","0");
        char a = '1';
        String l = "12";
        int d = Integer.valueOf(l);
        System.out.println(l);
        char b ='0';
        char c = (char) (a+b);
        System.out.println(c);
        System.out.println(b+a);
        System.out.println("111");
        String s1 = "123";
        char[] c1 = new StringBuilder(s1).reverse().toString().toCharArray();
    }
}
